<?php
/**
 * Created by PhpStorm OF yuyi.
 * User: YUYI
 * Date: 2018/5/21 0021
 * Time: 上午 11:45
 * Administrator
 */

namespace app\common\model;



class Comments extends BaseModel
{
    protected $table = 'comment';
    protected $pk = 'id';

    public function user()
    {
        return $this->hasOne('Users','userId','userId');
    }

    public function article()
    {
        return $this->hasOne('Articles','articleId','articleId');
    }
}